/************************************************************************

								Heroes IV
					  Copyright 2000, The 3DO Company

	------------------------------------------------------------------
  						       creature_type.cpp

	$Header: /game/creature_type.cpp $

	$NoKeywords: $

 ************************************************************************/

#include "precompiled.h"
#include "creature_type.h"

#include "elements_of.h"
#include "enum_map.h"

namespace
{
	t_char_ptr_pair const k_keywords[] =
	{
		{ k_air_elemental,		"air elemental" },
		{ k_angel,				"archangel"		},
		{ k_ballista,			"ballista"		},
		{ k_bandit,				"bandit"		},
		{ k_behemoth,			"behemoth"		},
		{ k_beholder,			"beholder"		},
		{ k_berserker,          "berserker"     },
		{ k_black_dragon,		"black dragon"	},
		{ k_bone_dragon,		"bone dragon"	},
		{ k_centaur,			"centaur"		},
		{ k_cerberus,			"cerberus"		},
		{ k_champion,			"champion"		},
		{ k_crossbowman,		"crossbowman"	},
		{ k_crusader,			"crusader"		},
		{ k_cyclops,			"cyclops"		},
		{ k_venom_spawn,		"venom spawn"	},
		{ k_devil,				"archdevil"		},
		{ k_dragon_golem,		"dragon golem"	},
		{ k_dwarf,				"dwarf"			},
		{ k_earth_elemental,	"earth elemental"},
		{ k_efreet,				"efreet"				},
		{ k_elf,				"elf"					},
		{ k_faerie_dragon,		"faerie dragon"			},
		{ k_fire_elemental,		"fire elemental"		},
		{ k_gargoyle,			"gargoyle"				},
		{ k_genie,				"genie"					},
		{ k_ghost,				"ghost"				 },
		{ k_gold_golem,			"gold golem"		 },
		{ k_griffin,			"griffin"			 },
		{ k_halfling,			"halfling"			 },
		{ k_harpy,				"harpy"				 },
		{ k_hydra,				"hydra"				 },
		{ k_ice_demon,			"ice demon"			 },
		{ k_imp,				"imp"				 },
		{ k_leprechaun,			"leprechaun"		 },
		{ k_mage,				"mage"				 },
		{ k_mantis,				"mantis"			 },
		{ k_medusa,				"medusa"			 },
		{ k_mermaid,			"mermaid"			 },
		{ k_minotaur,			"minotaur"			 },
		{ k_monk,				"monk"				 },
		{ k_mummy,				"mummy"				 },
		{ k_naga,				"naga"				 },
		{ k_nightmare,			"nightmare"			 },
		{ k_nomad,				"nomad"				 },
		{ k_ogre_mage,			"ogre mage"			 },
		{ k_orc,				"orc"				 },
		{ k_peasant,			"peasant"			 },
		{ k_phoenix,			"phoenix"			 },
		{ k_pikeman,			"pikeman"			 },
		{ k_pirate,				"pirate"			 },
		{ k_satyr,				"satyr"				 },
		{ k_sea_monster,		"sea monster"		},
		{ k_skeleton,			"skeleton"			},
		{ k_squire,				"squire"			},
		{ k_sprite,				"sprite"			},
		{ k_thunderbird,		"thunderbird"		},
		{ k_titan,				"titan"				},
		{ k_troglodyte,			"troglodyte"		},
		{ k_troll,				"troll"				},
		{ k_unicorn,			"unicorn"			},
		{ k_vampire,			"vampire"			},
		{ k_waspwort,			"waspwort"			},
		{ k_water_elemental,	"water elemental"	},
		{ k_white_tiger,		"white tiger"		},
		{ k_wolf,				"wolf"				},
		{ k_zombie,				"zombie"			},
	};

	t_enum_map<t_creature_type> k_creature_keyword_map( k_keywords, 
		                                                ELEMENTS_OF( k_keywords ),
														k_creature_type_count );
};


t_creature_type get_creature( std::string const& keyword )
{
	return k_creature_keyword_map[keyword];
}

std::string     get_keyword( t_creature_type creature )
{
	return k_creature_keyword_map[creature];
}
